ARG BUILD_FROM=crpi-3hy6o19oeqoq659i.cn-shanghai.personal.cr.aliyuncs.com/hacloud/armv7-base:3.16
FROM $BUILD_FROM

# 添加国内镜像源
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories

# 安装必要的工具
RUN apk add --no-cache \
    curl \
    jq \
    bash

# 复制工具脚本到根目录
COPY utils.sh /
COPY resource_manager.sh /
COPY gitee_api.sh /

# 复制运行脚本
COPY rootfs /

# 设置执行权限
RUN chmod a+x /*.sh /run.sh

CMD [ "/run.sh" ]